package com.xinghen.scheduler.event.impl;

import com.xinghen.scheduler.client.domain.RmsJobParam;
import com.xinghen.scheduler.client.domain.RmsJobResult;
import com.xinghen.scheduler.event.IRmsJobEvent;
import lombok.extern.slf4j.Slf4j;

/**
 * @author xinghen
 * @ClassName: DefRmsJobEvent
 * @Package: com.xinghen.scheduler.event.impl
 * @Description DefRmsJobEvent
 * @create 2017-12-08 17:29
 */
@Slf4j
public class DefRmsJobEvent implements IRmsJobEvent {
    @Override
    public boolean hasRunning(RmsJobParam rmsJobParam) {
        log.info("----- DefRmsJobEvent.hasRunning -----> {}", rmsJobParam.toString());
        return false;
    }

    @Override
    public void save(RmsJobParam param, RmsJobResult result) {
        if (param != null) {
            log.info("----- DefRmsJobEvent.save -----> {}", param.toString());
        }
        if (result != null) {
            log.info("----- DefRmsJobEvent.save -----> {}", result.toString());
        }
    }

    @Override
    public void delete(String fireInstanceId) {
        log.info("----- DefRmsJobEvent.delete -----> {}", fireInstanceId);
    }
}
